package com.jiazhong.集合类.Collection.List.ArrayListDemo;

import java.util.ArrayList;

public class ArrayListDemo1 {
    public static void main(String[] args) {
        //使用泛型创建集合类对象
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("1abc");
        arrayList.add("2def");
        arrayList.add("3ghi");
        System.out.println(arrayList);
        for (String str : arrayList
        ) {
            System.out.println(str.substring(0,1));
        }
    }
}
